requireNotEmpty

(alias) function <T> requireNotEmpty(value: list<T>?, message: text): list<T>

Deprecated

Use 'require_not_empty' instead

Checks for empty list and throws an exception if empty.

Alias

Alias target

Since

0.9.0

Parameters

value

The list to be checked.

message

The error message to be thrown if the list is empty.


(alias) function <T: -immutable> requireNotEmpty(value: set<T>?, message: text): set<T>

Deprecated

Use 'require_not_empty' instead

Checks for empty set and throws an exception if empty.

Alias

Alias target

Since

0.9.0

Parameters

value

The set to be checked.

message

The error message to be thrown if the set is empty.


(alias) function <K: -immutable, V> requireNotEmpty(value: map<K, V>?, message: text): map<K, V>

Deprecated

Use 'require_not_empty' instead

Checks for empty map and throws an exception if empty.

Alias

Alias target

Since

0.9.0

Parameters

value

The map to be checked.

message

The error message to be thrown if the map is empty.


(alias) function <T: -any> requireNotEmpty(value: T?, message: text): T

Deprecated

Use 'require_not_empty' instead

Checks for precence of a value and throws an exception if null.

Alias

Alias target

Since

0.9.0

Parameters

value

The nullable or empty value to be checked.

message

The error message to be thrown if the value is null or empty.